﻿Imports System
Imports System.Reflection

Namespace System.Workflow.ComponentModel
    Friend Class PathMemberInfoEventArgs
        Inherits EventArgs
        ' Methods
        Public Sub New(ByVal path As String, ByVal parentType As Type, ByVal memberInfo As MemberInfo, ByVal memberKind As PathMemberKind, ByVal lastMemberInThePath As Boolean)
            Me.indexParameters = New Object(0  - 1) {}
            If String.IsNullOrEmpty(path) Then
                Throw New ArgumentNullException("path")
            End If
            If (parentType Is Nothing) Then
                Throw New ArgumentNullException("parentType")
            End If
            If (memberInfo Is Nothing) Then
                Throw New ArgumentNullException("memberInfo")
            End If
            Me.path = path
            Me.parentType = parentType
            Me.memberInfo = memberInfo
            Me.memberKind = memberKind
            Me.lastMemberInThePath = lastMemberInThePath
        End Sub

        Public Sub New(ByVal path As String, ByVal parentType As Type, ByVal memberInfo As MemberInfo, ByVal memberKind As PathMemberKind, ByVal lastMemberInThePath As Boolean, ByVal indexParameters As Object())
            Me.New(path, parentType, memberInfo, memberKind, lastMemberInThePath)
            Me.indexParameters = indexParameters
        End Sub


        ' Properties
        Public Property Action As PathWalkAction
            Get
                Return Me.action
            End Get
            Set(ByVal value As PathWalkAction)
                Me.action = value
            End Set
        End Property

        Public ReadOnly Property IndexParameters As Object()
            Get
                Return Me.indexParameters
            End Get
        End Property

        Public ReadOnly Property LastMemberInThePath As Boolean
            Get
                Return Me.lastMemberInThePath
            End Get
        End Property

        Public ReadOnly Property MemberInfo As MemberInfo
            Get
                Return Me.memberInfo
            End Get
        End Property

        Public ReadOnly Property MemberKind As PathMemberKind
            Get
                Return Me.memberKind
            End Get
        End Property

        Public ReadOnly Property Path As String
            Get
                Return Me.path
            End Get
        End Property


        ' Fields
        Private action As PathWalkAction
        Private indexParameters As Object()
        Private lastMemberInThePath As Boolean
        Private memberInfo As MemberInfo
        Private memberKind As PathMemberKind
        Private parentType As Type
        Private path As String
    End Class
End Namespace

